#ifndef XFILTER_H
#define XFILTER_H

#include <opencv2/core.hpp>
#include <vector>

enum XTaskType {
    XTASK_NONE,
    XTASK_GAIN,      //亮度对比度调整
    XTASK_ROTATE90,  //三个旋转
    XTASK_ROTATE180,
    XTASK_ROTATE270,
    XTASK_FLIPX,   //三个镜像
    XTASK_FLIPY,
    XTASK_FLIPXY,
    XTASK_RESIZE, //尺寸
    XTASK_PYDOWN, //高斯金字塔
    XTASK_PYUP,   //拉普拉斯金字塔
    XTASK_CLIP,   //裁剪
    XTASK_GRAY,   //灰度图
    XTASK_MARK,   //添加水印
    XTASK_BLEND,  //视频融合
    XTASK_MERGE,  //视频合并
};

struct XTask {
    XTaskType type;
    std::vector<double> para;
};

class XFilter
{
public:
    //单例
    static XFilter* getInstance();
    virtual ~XFilter();

    //纯虚函数
    virtual cv::Mat fFilter(cv::Mat mat1, cv::Mat mat2) = 0;
    virtual void fAdd(XTask task) = 0;
    virtual void fClear() = 0;

protected:
    XFilter();
};

#endif // XFILTER_H
